<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
   xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
   xmlns:f="http://xmlns.jcp.org/jsf/core"
   xmlns:h="http://xmlns.jcp.org/jsf/html"
   xmlns:p="http://primefaces.org/ui"   
   xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
   template="/WEB-INF/templates/default.xhtml">
   
   	<f:metadata>	   	
	   	<f:viewParam name="firstResult" value="#{historicBpmList.firstResult}"></f:viewParam>	
	   	<f:viewParam name="processKey" value="#{historicBpmList.processKey}"></f:viewParam>
	   	<f:viewParam name="supplierName" value="#{historicBpmList.supplierName}"></f:viewParam>
	   	<f:viewParam name="projectName" value="#{historicBpmList.projectName}"></f:viewParam>
	   	<f:viewParam name="assignee" value="#{historicBpmList.assignee}"></f:viewParam>
	   	<f:viewParam name="name" value="#{historicBpmList.name}"></f:viewParam>
	   	<f:viewParam name="moduleName" value="已办工作"></f:viewParam>
   	</f:metadata>
   
   	<ui:define name="content">
		<h:form id="searchForm">
			<div style="height:80px;margin-left:10px;">	
				<p:outputLabel value="审批环节："></p:outputLabel>				
				<p:inputText value="#{historicBpmList.name}"></p:inputText>
				#{'    '}		
				<p:outputLabel value="办理人：" rendered="#{request.isUserInRole('developer')}"></p:outputLabel>				
				<p:inputText value="#{historicBpmList.assignee}" rendered="#{request.isUserInRole('developer')}"></p:inputText>
				#{'    '}	
				<p:outputLabel value="中介名称："></p:outputLabel>				
				<p:inputText value="#{historicBpmList.supplierName}"></p:inputText>
				#{'    '}
				<p:outputLabel value="公告名称："></p:outputLabel>				
				<p:inputText value="#{historicBpmList.projectName}"></p:inputText>
				#{'    '}	
				<br/>	
				<div class="actionButtons" style="margin-top:10px;">
					<p:commandButton value="查询" ajax="false"  action="ApplyCancelFinishedTaskList.xhtml?faces-redirect=true&amp;includeViewParams=true&amp;firstResult=0" styleClass="blue-int"></p:commandButton>
					#{'    '}
					<p:button value="重置" outcome="ApplyCancelFinishedTaskList.xhtml?processKey=#{param.processKey}"></p:button>
				</div>				
				<div class="clearbt"></div>
			</div>	
			<p:panel id="searchResult">
				<f:facet name="header">#{param.moduleName}</f:facet>
				<p:dataTable value="#{historicBpmList.resultList}" var="_task">
					
					<p:column headerText="审批环节" width="80">
						<h:outputText value="#{_task.name}" />
					</p:column>
					<p:column headerText="办理人">
						<h:outputText value="#{_task.assignee}" />
					</p:column>
					<p:column headerText="审批类型" width="80">
						<h:outputText value="#{_task.processVariables['auditFlag'] == 'true' ? '通过' : '驳回'}" />
					</p:column>
					<p:column headerText="审批意见">
						<h:outputText value="#{_task.processVariables['adminRejectReason']}" />
					</p:column>
					
					<p:column headerText="中介">
						<h:outputText value="#{_task.processVariables['supplierName']}" />
					</p:column>	
					<p:column headerText="公告名称">
						<h:outputText value="#{_task.processVariables['projectName']}" />
					</p:column>							
					<p:column headerText="开始时间">
						<h:outputText value="#{_task.createTime}" >
							<f:convertDateTime pattern="yyyy-MM-dd HH:mm:ss"/>
						</h:outputText>
					</p:column>
					<p:column headerText="完成时间">
						<h:outputText value="#{_task.endTime}" >
							<f:convertDateTime pattern="yyyy-MM-dd HH:mm:ss"/>
						</h:outputText>
					</p:column>
				</p:dataTable>
				<ui:include src="/WEB-INF/templates/manage/pagination.xhtml">
				<ui:param name="entityList" value="#{historicBpmList}" />
			</ui:include>
			</p:panel>
			
		</h:form>
      
   	</ui:define>
</ui:composition>
